package com.voice.server.repository;

import com.voice.server.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/*
 * @auther: wangjiacai
 *
 * @create: 2018-04-23 11:54:50
 */
public interface RoleRepository extends JpaRepository<Role,String> {

    Role findByName(String name);

    @Query("select name from Role where id in (?1)")
    List<String> findByIdIn(List<String> ids);

}
